<!--{include header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="order-detail">
	<div class="dashboard" id="dashboard">
		<ul>${current_account(null)}</ul>
	</div>
    <div id="content">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>Chi tiết đơn hàng</h2><h2>#{$order['code']}</h2>
                </div>
                <div class="sect">
<table cellspacing="0" cellpadding="0" border="0" class="data-table" style="width: 100%">
    <tr>
        <th>Ngày đặt</th>
        <td><span>${date('d-m-Y H:i',$order['create_time'])}</span></td>
    </tr>
    <tr>
        <th>Tình trạng</th>
        <!--{if $order['state']=='pay'}-->
        <td><span style="font-size: 15px; color: green">Đã thanh toán</span></td>
        <!--{else}-->
        <td><span style="font-size: 15px; color: red;">Chưa thanh toán</span></td>
        <!--{/if}-->
    </tr>
<!--{if $order['condbuy']}-->
    <tr>
        <th>order options </th>
        <td colspan="3" class="status">{{$order['condbuy']}}</td>
    </tr>
<!--{/if}-->
<!--{if $order['remark']}-->
    <tr>
        <th>notes </th>
        <td colspan="3" class="status">${htmlspecialchars($order['remark'])}</td>
    </tr>
<!--{/if}-->
</table>
<table cellspacing="0" cellpadding="0" border="0" class="info-table">
    <tr>
        <th class="left" width="160px">Sản phẩm</th>
        <th width="35">Đơn giá ({$currency})</th>
        <th width="10"></th>
        <th width="45">Số lượng</th>
        <th width="10"></th>
        <th width="45">Thành tiền ({$currency})</th>
    </tr>
    <tr>
        <td class="left"><a href="/team.php?id={$order['team_id']}" target="_blank">{$team['title']}</a></td>
        <td>${moneyit($order['price'])}</td>
        <td>x</td>
        <td>{$order['quantity']}</td>
        <td>=</td>
        <td class="total">${moneyit($order['price']*$order['quantity'])}</td>
    </tr>

<!--{if $order['card_id']}-->
    <tr>
        <td class="left">card {$order['card_id']}</td>
        <td>${moneyit($order['card'])}</td>
        <td>x</td>
        <td>1</td>
        <td>=</td>
        <td class="total">${moneyit($order['card'])}</td>
        <td class="status">-</td>
    </tr>
<!--{/if}-->

<!--{if $express}-->
    <tr>
        <td class="left">Phí vận chuyển</td>
        <td>${moneyit($team['fare'])}</td>
        <td>x</td>
        <td>1</td>
        <td>=</td>
        <td class="total">${moneyit($team['fare'])}</td>
    </tr>
<!--{/if}-->

<!--{if $express||$order['card_id']}-->
    <tr>
        <td class="left"></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td class="total">${moneyit($order['origin'])}</td>
    </tr>
<!--{/if}-->
<!--{if $order['delivery']=='express'}-->
<tr><td colspan="3"><h2>Tổng tiền thanh toán</h2></td><td colspan="3"><h2><span class="money">{$tongtien}</span></h2></td></tr>
<!--{/if}-->
</table>
<!--{if $team['delivery']=='coupon'}-->
<table cellspacing="0" cellpadding="0" border="0" class="data-table">
    <tr>
        <th>{$INI['system']['couponname']} </th>
        <td class="other-coupon"><!--{if empty($coupons)}-->{$INI['system']['couponname']}would be sent to customers automatically after the deal tipped<!--{/if}--><!--{loop $coupons $one}--><p>{$one['id']} - {$one['secret']}</p><!--{/loop}--></td>
    </tr>
    <tr>
        <th>using method </th>
        <td>before consumption, please show your{$INI['system']['couponname']} to verify the coupon's No.and code with the biz.</td>
    </tr>
</table>
<!--{elseif $team['delivery']=='express'}-->
<h2>Thông tin giao phiếu</h2>
<table cellspacing="0" cellpadding="0" border="0" class="data-table" style="width: 100%">
    <tr>
	<!--{if $order['express_id']}-->
        <td>Đã giao phiếu bằng hình thức {$option_express[$order['express_id']]}</td>
	<!--{else}-->
        <td colspan="2" class="other-coupon">Chờ nhận phiếu.</td>
	<!--{/if}-->
    </tr>
    <tr>
        <th>Người nhận </th>
        <td width="300px">{$order['realname']}</td>
    </tr>
    <tr>
        <th>Địa chỉ </th>
        <td>{$order['address']}</td>
    </tr>
    <tr>
        <th>Điện thoại </th>
        <td>{$order['mobile']}</td>
    </tr>
        <!--{if $donhang['remark']!=""} -->
    <tr>
        <th>Chi chú </th>
        <td>{$donhang['remark']}</td>
    </tr>
    <!--{/if} -->    
    <tr><td colspan="4" style="text-align: right">
    	<input type="button" value="Xem giỏ hàng" class="formbutton" onclick="javascript:location='/user/gio-hang.html'">
    	<input type="button" value="Về trang chủ" class="formbutton" onclick="javascript:location='../'">
    </td></tr>
</table>
	<!--{elseif $team['delivery']=='pickup'}-->
	<table cellspacing="0" cellpadding="0" border="0" class="data-table">
	    <tr>
	        <th>self delivery </th>
	        <td class="other-coupon"></td>
	    </tr>
	    <tr>
	        <th>location </th>
	        <td>{$team['address']}</td>
	    </tr>
	    <tr>
	        <th>telephone </th>
	        <td>{$team['mobile']}</td>
	    </tr>
	</table>
	<!--{/if}-->
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
    <div id="sidebar">
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
